package com.talent.web.controller;

import com.talent.web.model.TalentResult;
import com.talent.web.model.entity.TlOrder;
import com.talent.web.service.ITlOrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName：OrderController
 * @Author: hszhou
 * @Date: 2025/3/26 13:30
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@RestController
@RequestMapping("order")
@RequiredArgsConstructor
public class OrderController {

    private final ITlOrderService orderService;

    @PostMapping("create")
    public TalentResult<TlOrder> createOrder(@RequestBody TlOrder order) {
        TlOrder order1 = orderService.createOrder(order);
        return TalentResult.success(order1);
    }
}
